<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<title>短信发送</title>
<link href="/css/main.css" rel="stylesheet">
</head>
<body>
	目标手机：<input id="phone" value="13709088388"/>，内容：<input id="content" value="您好，老陈"/>
	<br/>
	<input type="button" value="通知" onclick="send();"/>
	<input type="button" value="发送验证码" onclick="sendVerifyCode();"/>
</body>
</html>
<script src="../../js/jquery.3.2.1.min.js"></script>
<script>
	function send(){
		$.ajax({
			type : 'get',
			url : '/sms/send',
			async : false,
			contentType : "application/json;charset=utf-8",
			data : {phone: $('#phone').val(), content: $('#content').val()},
			success : function(data) {
				console.log(data);
			},
			error : function(e) {
				console.log(e);
				alert(JSON.stringify(e));
			}
		});
	}
	function sendVerifyCode(){
		$.ajax({
			type : 'get',
			url : '/sms/sendVerifyCode',
			async : false,
			contentType : "application/json;charset=utf-8",
			data : {phone: $('#phone').val()},
			success : function(data) {
				console.log(data);
			},
			error : function(e) {
				console.log(e);
				alert(JSON.stringify(e));
			}
		});
	}
</script>